<?php


namespace Tests\Feature\Commnet;



use App\Models\Topic;
use App\Models\User;

trait Comment
{
    protected function comment()
    {
        $user = $this->create(User::class);
        $topic = $this->create(Topic::class);
        return $topic->comments()->create(['user_id' => $user->id, 'content' => $this->faker->sentence()]);
    }
}
